﻿using System.Collections.Generic;
using Might.Infrastructure.ModelicaDOM;

namespace Might.Modelica.Annotations.Graphics {
    ///<summary>
    ///</summary>
    [Mapping("Extent")]
    public class GraphicsExtent  {
        ///<summary>
        ///</summary>
        public GraphicsExtent() {
            P1 = new GraphicsPoint();
            P2 = new GraphicsPoint();
        }

        ///<summary>
        ///</summary>
        ///<param name="p1"></param>
        ///<param name="p2"></param>
        public GraphicsExtent(GraphicsPoint p1, GraphicsPoint p2) {
            P1 = p1;
            P2 = p2;
        }

        ///<summary>
        ///</summary>
        [ArrayIndexMapping(0), ConstructorIndexMapping(0)]
        public GraphicsPoint P1 { get; set; }

        ///<summary>
        ///</summary>
        [ArrayIndexMapping(1), ConstructorIndexMapping(1)]
        public GraphicsPoint P2 { get; set; }

        [UnknownMapping]
        public List<object> UnknownItems { get; set; }

        public bool IsDefault {
            get { return P1.IsDefault && P2.IsDefault; }
        }
    }
}